MODE = int(1e9 + 7)

print((pow(9, 10000, MODE) - 2 * pow(8, 10000, MODE) + pow(7, 10000, MODE)) % MODE)
